package kr.or.kead.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class Mysql_con {

	private static Connection getDatabaseConnection() throws ClassNotFoundException {
		//Class.forName("jdbc:oracle:thin:@127.0.0.1:1521:XE");
		Class.forName("oracle.jdbc.OracleDriver");
		try {			
			return DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XE", "shma", "shma");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			throw new RuntimeException(e);
		}
	}

	public static Connection getConnection() {
		Connection con = null;
		try {
			con = Mysql_con.getDatabaseConnection();
			System.out.println("sucess db");
		} catch (ClassNotFoundException e1) {			
			e1.printStackTrace();
		}
		return con;
	}

}
